<template>
	<view>
		<view class="cart">
			<view class="check">
				<checkbox-group @change="checkboxChange">
					<checkbox color="#a397fd" style="transform:scale(0.7)" :value="price" ></checkbox>
				</checkbox-group>
			</view>
			<view class="image">
				<image src="/static/sort/力量器材/7.5公斤六角哑铃（单只）03.jpg" mode="widthFix"></image>
			</view>
			<view class="text">
				<text class="title">健身器械健身器械健身器械健身器械健身器械健身器械健身器械健身器械</text>
				<text class="price">¥{{price}}</text>
				<uni-tag text="包邮到家" type="warning" />
					<!-- <uni-number-box :min="1" background="#a397fd" color="#fff" class="num"/> -->
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				price:'99.00',
			
			}
		},
		methods: {
			checkboxChange(e){
				console.log(e,this.checked)
				this.$emit('showChild', {
					childName: e.detail.value[0]
				})
				
			},
		
		}
	}
</script>

<style lang="scss">
	.cart{
		display: flex;
		width: 85%;
		border: 2px solid #a397fd;
		border-radius: 50rpx;
		padding: 30rpx;
		margin:10rpx auto;
		position: relative;
		top: -100rpx;
		z-index: 999;
		background-color: #fff;
		.image{
			width: 20%;
			image{
				width: 100%;
			}
		}
		.text{
			width: 60%;
			.title{
				display: block;
				overflow: hidden;
				white-space: nowrap;
				text-overflow: ellipsis;
				
			}
			.price{
				display: block;
				color: #a397fd;
				font-weight: bold;
			}
			.num{
				position: absolute;
				right: 50rpx;
				bottom: 50rpx;
			}
		}
	}
</style>
